#include "MyThread.h"
#include <iostream>

void fun(void * p)
{
	MyThread * ptr = (MyThread *)p;
	ptr->run(ptr);	
}

MyThread::MyThread()
{
	pTh = new std::thread(fun, this);
}

MyThread::~MyThread()
{
	pTh->join();
	delete pTh;
}

void MyThread::run(void * p)
{
	std::cout << "hello world " << std::endl;
}
